package com.youxin.busfoundation.enums;

/**
 * 股东类型
 * @author yingde.cao
 *
 */
public enum ShareholderType {
	COMPANY(1,"公司"),
	NaturalPerson(2,"自然人"),
	;
	
	public int getValue() {
		return value;
	}
	
	private int value;
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(int value) {
		this.value = value;
	}

	private ShareholderType(int value,String name) {
		this.value = value;
		this.name=name;
	}
	
	public static ShareholderType valueOf(int val)
	{			
		for(ShareholderType m : ShareholderType.values()) 
		{
			if(val==m.getValue())
				return m;
	    }
		return null;
	}
}
